package com.cskaoyan.dbutils.resultSetHandler;

import com.cskaoyan.datasource.DruidUtils;
import org.apache.commons.dbutils.QueryRunner;
import org.apache.commons.dbutils.handlers.MapHandler;

import java.sql.SQLException;
import java.util.Map;

/**
 * 创建日期: 2022/07/02 11:12
 *
 * @author ciggar
 */
public class MapHandlerDemo {

    public static void main(String[] args) throws SQLException {

        QueryRunner queryRunner = new QueryRunner(DruidUtils.getDataSource());

        Map<String, Object> map = queryRunner.query("select id as uid,name,money from account", new MapHandler());

        System.out.println(map);

    }

}
